package com.eastfair.imaster.entity;

import cn.afterturn.easypoi.excel.annotation.Excel;
import cn.afterturn.easypoi.excel.annotation.ExcelEntity;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.eastfair.core.base.entity.Entity;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableField;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.time.LocalDateTime;
import java.util.HashMap;
import java.util.Map;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.ToString;
import lombok.experimental.Accessors;
import static com.eastfair.core.utils.DateUtils.DEFAULT_DATE_TIME_FORMAT;
import com.eastfair.annotation.model.EchoVO;

import static com.baomidou.mybatisplus.annotation.SqlCondition.LIKE;

/**
 * <p>
 * 实体类
 * 嘉宾
 * </p>
 *
 * @author zjn
 * @since 2021-11-15
 */
@Data
@NoArgsConstructor
@ToString(callSuper = true)
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@TableName("o_speaker")
@ApiModel(value = "Speaker", description = "嘉宾")
@AllArgsConstructor
public class Speaker extends Entity<Long> implements EchoVO {

    private static final long serialVersionUID = 1L;
    @TableField(exist = false)
    private Map<String, Object> echoMap = new HashMap<>();
    /**
     * 项目id
     */
    @ApiModelProperty(value = "项目id")
    @TableField(value = "project_id")
    @Excel(name = "项目id")
    private Long projectId;

    /**
     * 嘉宾名称
     */
    @ApiModelProperty(value = "嘉宾名称")
    @Size(max = 32, message = "嘉宾名称长度不能超过32")
    @TableField(value = "name", condition = LIKE)
    @Excel(name = "嘉宾名称")
    private String name;

    /**
     * 嘉宾英文名称
     */
    @ApiModelProperty(value = "嘉宾英文名称")
    @Size(max = 32, message = "嘉宾英文名称长度不能超过32")
    @TableField(value = "en_name", condition = LIKE)
    @Excel(name = "嘉宾英文名称")
    private String enName;

    /**
     * 公司名称
     */
    @ApiModelProperty(value = "公司名称")
    @Size(max = 64, message = "公司名称长度不能超过64")
    @TableField(value = "company_name", condition = LIKE)
    @Excel(name = "公司名称")
    private String companyName;

    /**
     * 公司英文名称
     */
    @ApiModelProperty(value = "公司英文名称")
    @Size(max = 64, message = "公司英文名称长度不能超过64")
    @TableField(value = "company_en_name", condition = LIKE)
    @Excel(name = "公司英文名称")
    private String companyEnName;

    /**
     * 介绍
     */
    @ApiModelProperty(value = "介绍")
    @Size(max = 65535, message = "介绍长度不能超过65535")
    @TableField(value = "introduce", condition = LIKE)
    @Excel(name = "介绍")
    private String introduce;

    /**
     * 英文介绍
     */
    @ApiModelProperty(value = "英文介绍")
    @Size(max = 65535, message = "英文介绍长度不能超过65535")
    @TableField(value = "en_introduce", condition = LIKE)
    @Excel(name = "英文介绍")
    private String enIntroduce;

    /**
     * 头像
     */
    @ApiModelProperty(value = "头像")
    @Size(max = 255, message = "头像长度不能超过255")
    @TableField(value = "head_image_url", condition = LIKE)
    @Excel(name = "头像")
    private String headImageUrl;

    /**
     * 是否启用：1是；0否
     */
    @ApiModelProperty(value = "是否启用：1是；0否")
    @TableField(value = "is_enabled")
    @Excel(name = "是否启用：1是；0否")
    private Integer isEnabled;

    /**
     * 是否删除：1是；0否
     */
    @ApiModelProperty(value = "是否删除：1是；0否")
    @TableField(value = "is_deleted")
    @Excel(name = "是否删除：1是；0否")
    private Integer isDeleted;


    @Builder
    public Speaker(Long id, Long createdBy, LocalDateTime createTime, Long updatedBy, LocalDateTime updateTime, 
                    Long projectId, String name, String enName, String companyName, String companyEnName, 
                    String introduce, String enIntroduce, String headImageUrl, Integer isEnabled, Integer isDeleted) {
        this.id = id;
        this.createdBy = createdBy;
        this.createTime = createTime;
        this.updatedBy = updatedBy;
        this.updateTime = updateTime;
        this.projectId = projectId;
        this.name = name;
        this.enName = enName;
        this.companyName = companyName;
        this.companyEnName = companyEnName;
        this.introduce = introduce;
        this.enIntroduce = enIntroduce;
        this.headImageUrl = headImageUrl;
        this.isEnabled = isEnabled;
        this.isDeleted = isDeleted;
    }

}
